#include "VOFA.h"
#include "chassis_task.h"
#include "stdio.h"
#include "cmsis_os.h"
#include "bsp_usart.h"
#include "chassis_power_control.h"
#include "referee.h"
int32_t motor_chassis0_speed_500;
int32_t motor_chassis1_speed_500;
int32_t motor_chassis0_set_speed_500;
int32_t motor_chassis1_set_speed_500;

float power_limit,power_buffer_limit1,power_buffer_limit2;
void vofa_task(void const * argument)
{   
        while(1)
        {
            motor_chassis0_speed_500=(int32_t )(chassis_move.motor_chassis[0].speed*500);
						motor_chassis1_speed_500=(int32_t )(chassis_move.motor_chassis[1].speed*500);
						motor_chassis0_set_speed_500=(int32_t )(chassis_move.motor_chassis[0].speed_set*500);
						motor_chassis1_set_speed_500=(int32_t )(chassis_move.motor_chassis[1].speed_set*500);
            
            power_limit=30;
                  
						power_buffer_limit1=150;
						power_buffer_limit2=50;
           // printf("motor_speed: %d, %d\n",motor_chassis0_speed_500,motor_chassis0_set_speed_500 );
						//printf("power: %f, %f\n",power_control.chassis_power,power_control.chassis_power_sat );
						//printf("%f  %f  %f  %f  %d\n",power_limit,power_heat_data_t.chassis_power,power_buffer_limit1,power_buffer_limit2,power_heat_data_t.chassis_power_buffer);
						printf("%f  %d\n",power_limit,power_heat_data_t.chassis_power_buffer);
						vTaskDelay(10);
      }
}
